package org.yxt.message.push.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.yxt.message.push.pojo.ResponseMessage;

/**
 * 消息推送
 *
 * @author helloword
 * @date 2020/6/23 15:05
 **/
@Controller
@RequestMapping(value = "message")
@Api(value = "MessageController", tags = {"http协议的消息推送"})
public class MessageController {

    @ResponseBody
    @PostMapping(value = "pushStringMessage")
    @ApiOperation(value = "推送消息", notes = "推送消息为字符串数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "data", value = "推送的数据", example = "测试推送", required = true, dataType = "String"),
    })
    public ResponseMessage pushStringMessage(String data) {
        ResponseMessage responseMessage = new ResponseMessage();
        return responseMessage;
    }
}
